const puppeteer = require('puppeteer');
const { screenPath } = require('../config/defaultConfig');

// async function xx () {
//   const borwser = await puppeteer.launch()
//   const page = await borwser.newPage()
//   await page.goto('http://cn.bing.com')
//   await page.screenshot({
//     path: `${screenPath}/${+new Date()}.png`
//   })
// }
// xx()


(async () => {
  const borwser = await puppeteer.launch()
  const page = await borwser.newPage()
  await page.goto('http://cn.bing.com')
  await page.screenshot({
    path: `${screenPath}/${+new Date()}.png`
  })
  await borwser.close()
})()